<template>
    <a-textarea v-model:value="textValue" v-bind="custProps" @dblclick="showMaxInput"></a-textarea>

    <lo-modal
        title="请输入"
        width="1000px"
        :showButton="false"
        ref="maxInputRef">
        <div class="wfull">
            <a-textarea
                style="height: 500px"
                v-model:value="textValue"
                placeholder="请输入" />
            <div class="mar-t10">
                <slot>

                </slot>
            </div>
        </div>
    </lo-modal>
</template>

<script lang="jsx" setup>
import { ref, onMounted, onActivated, useAttrs, computed, watch } from 'vue'

defineOptions({
    inheritAttrs: false
})
const props = defineProps({

})
const emit = defineEmits(['update:value'])

const attrs = useAttrs()
const custProps = computed(() => {
    return attrs
})

const textValue = ref('')
onMounted(() => {
    textValue.value = attrs.value
})

watch(() => attrs.value, val => {
    textValue.value = val
})

watch(textValue, val => {
    emit('update:value', val)
})



const maxInputRef = ref(null)
function showMaxInput(item, field) {
    maxInputRef.value.open()
}


</script>

<style></style>
